package com.http;

import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author: 一个小菜逼
 * @Date: 2020/4/16
 */
public class MyHttpServer {

    public void recive() throws Exception{
    }

    public static void main(String[] args) throws Exception{
        ServerSocket serverSocket = new ServerSocket(8848);
        Socket accept = serverSocket.accept();
        InputStream inputStream = accept.getInputStream();
        byte[] bytes=new byte[1024];
        int read = inputStream.read(bytes);
        String s = new String(bytes, "UTF-8");
        System.out.println(s);
    }
}
